<?php
namespace app\api\model;
use think\Model;

// 联系人信息表

class User extends Model
{
    protected $hidden = ['password'];
    protected $autoWriteTimestamp = true;
    protected $updateTime = false;
	protected $pk = 'id';
    // 关联角色
    public function frole() {
        return $this->hasOne('\app\api\model\Role','id','role')
        ->bind(['name', 'desc', 'access']);
    }

    // 关联联系信息
    public function fcontact() {
        return $this->hasOne('\app\api\model\Contact','id','contact')->bind(['mobile' ,'lxr' => 'name']);
    }
}

